//
//  SampuxReminderViewController.m
//  Sampux
//
//  Created by rzm on 16/7/5.
//  Copyright © 2016年 rzm. All rights reserved.
//

#import "SampuxReminderViewController.h"
#import "SampuxReminderView.h"
#import "SampuxSetNewPWViewController.h"

@interface SampuxReminderViewController ()<SampuxRemindViewNextStepDelegate>

@end

@implementation SampuxReminderViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.navigationItem setHidesBackButton:YES];
//    [self createBackBarButtonItem];
    [self createReminderView];
}

- (void)createReminderView
{
    SampuxReminderView *reminderView = [[SampuxReminderView alloc]initWithFrame:CGRectMake(0, 0, self.view.width, self.view.height )];
    [self.view addSubview:reminderView];
    reminderView.nextStepClickDelegate = self;

    reminderView.sendCodeBlock = ^()
    {
        UIAlertController *alertCtr = [UIAlertController showAlertControllerSheet:@"请核对您的手机号是否填写正确" message:nil cancel:@"取消" other:@"确定"];
        [self presentViewController:alertCtr animated:YES completion:nil];
    };    
}

- (void)remindViewNextStepBtnClick
{
    dispatch_async(dispatch_get_main_queue(), ^{
        SampuxSetNewPWViewController *setNewVC = [[SampuxSetNewPWViewController alloc]init];
        [self.navigationController pushViewController:setNewVC animated:YES];
    });
}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:YES];
    SampuxCustomNavController *nav = (SampuxCustomNavController *)self.navigationController;
    nav.titleStr = @"找回密码";
}
@end
